package com.example.orderminiappapi.service.Impl;

import com.example.orderminiappapi.bean.Request;
import com.example.orderminiappapi.bean.SearchCondition;
import com.example.orderminiappapi.bean.Shop;
import com.example.orderminiappapi.bean.ShopSearchCondition;
import com.example.orderminiappapi.dao.ShopDao;
import com.example.orderminiappapi.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopServiceImpl implements ShopService {

    @Autowired
    private ShopDao shopDao;

    @Override
    public List<Shop> selectShop(ShopSearchCondition shopSearchCondition) {
        return shopDao.selectShop(shopSearchCondition);
    }

    @Override
    public List<Shop> searchRecommendShop() {
        return shopDao.searchRecommendShop();
    }

    @Override
    public Shop searchShopDetailByShopId(Shop shop) {
        return shopDao.searchShopDetailByShopId(shop);
    }

    @Override
    public List<Shop> searchShopByKeywords(Request request) {
        return shopDao.searchShopByKeywords(request);
    }

    @Override
    public List<Shop> shopOwnerSearch(Shop shop) {
        return shopDao.shopOwnerSearch(shop);
    }

    @Override
    public List<Shop> shopOwnerSearchExamine(Shop shop) {
        return shopDao.shopOwnerSearchExamine(shop);
    }

    @Override
    public List<String> getAllBackCateName() {
        return shopDao.getAllBackCateName();
    }

    @Override
    public Shop searchOneShop(Shop shop) {
        return shopDao.searchOneShop(shop);
    }

    @Override
    public int updateShopInfo(Shop shop) {
        return shopDao.updateShopInfo(shop);
    }

    @Override
    public int applyNewShop(Shop shop) {
        return shopDao.applyNewShop(shop);
    }

    @Override
    public int completeOrder(Shop shop) {
        return shopDao.completeOrder(shop);
    }

    @Override
    public List<Shop> searchAllShop(SearchCondition searchCondition) {
        return shopDao.searchAllShop(searchCondition);
    }

    @Override
    public int searchAllShopCount(SearchCondition searchCondition) {
        return shopDao.searchAllShopCount(searchCondition);
    }

    @Override
    public int suspendTheShop(Shop shop) {
        return shopDao.suspendTheShop(shop);
    }

    @Override
    public int continueTheShop(Shop shop) {
        return shopDao.continueTheShop(shop);
    }
}
